package booroo.basic;

public class Ex72_OOP {

		public static void main(String[] args) {
		// 객체 생성 및 객체 다루기
		Ex72_Retangle r = new Ex72_Retangle();
			r = new Ex72_Retangle(4, 40, "red");
			System.out.println(r.width);								
			System.out.println(r.height);								
			System.out.println(r.color);
			System.out.println(r.getArea());
			System.out.println(r.getCircum());
		
		Ex73_Fan fan = new Ex73_Fan(10, "yellow", 3, "true");
			
			System.out.println(fan.radius);
			System.out.println(fan.color);
			System.out.println(fan.speed);
			System.out.println(fan.on);
			
		Ex74_Account Account = new Ex74_Account();
		Ex75_Stock stock = new Ex75_Stock();
		} // main
} // class

	class Ex72_Retangle{
		double width;
		double height;
		String color;
		
		double getArea(){
			double area = width * height;
			return area;
		}
		double getCircum(){
			double circum = (width + height)*2;
			return circum;
		}
		public Ex72_Retangle() {}
		public Ex72_Retangle(double width, double height, String color) {
			this.width = width;
			this.height = height;
			this.color = color;
		}				
	}
	class Ex73_Fan{
		final int SLOW = 1;
		final int MEDIUM = 2;
		final int FAST = 3;
		int speed;
		String on;
		double radius;
		String color;
		
		
		public Ex73_Fan() {
				speed = SLOW;
				on = "false";
				radius = 5.0;
				color = "blue";
		}
		public Ex73_Fan(double radius, String color, int speed, String on){
			this.radius = radius;
			this.color = color;
			this.speed = speed;
			this.on = on;
		}
	
				
	}
	class Ex74_Account{
		int aid;
		int balance;
		int interestRate;
		int dateCreated;
							
		}
		
	
	class Ex75_Stock{
		String sname;
		int previousClosingPrice;
		int currentPrice;
		public Ex75_Stock() {
			sname = "경영기술";
			previousClosingPrice = 100;
			currentPrice = 75;
		}
	}